package com.zbkj.crmeb.enums;

import com.baomidou.mybatisplus.annotation.IEnum;

/**
 * 人群特征
 * @Author: wangzh
 * @Date: 2022/9/27 14:41
 */
public enum CrowdCharacteristicsEnum implements IEnum<Integer> {

    HAVE_PURCHASE(1,"店铺有购买"),

    NO_PURCHASE(2,"店铺无购买"),

    WITH_REPURCHASE(3,"店铺有复购"),

    NO_REPURCHASE(4,"店铺无复购"),

    HAVE_ACCESS(5,"店铺有访问"),

    NO_ACCESS(6,"店铺无访问"),

    PAY_PRICE(7,"实付购买金额"),

    PAY_TIME(8,"实付购买次数"),

    VIP_LEVEL(9,"会员等级"),

    PAY_VIP(10,"付费会员"),

    BALANCE(11,"余额");

    private final Integer code;
    private final String msg;

    public static CrowdCharacteristicsEnum valueOf(Integer code){
        for (CrowdCharacteristicsEnum value : values()){
            if (value.getCode() == code){
                return value;
            }
        }
        return null;
    }

    CrowdCharacteristicsEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    public Integer getValue() {
        return code;
    }
}
